﻿using System;

namespace AspNetInfo.Models
{
    public class JavaScriptVariable
    {
        public string Name { get; set; }
        public string Value { get; set; }
        public string Format { get; set; }

        public JavaScriptVariable(string name, string value) : this(name, value, "\"{0}\"") { }
        public JavaScriptVariable(string name, string value, string format)
        {
            Name = name;
            Value = value;
            Format = format;
        }

        public string GetFormatedValue()
        {
            return String.Format(Format, Value);
        }
    }
}
